<?php
namespace app\common\model;

use think\Model;

class TaskCondition extends Model
{
    // 指定表名,不含前缀
    protected $name = 'task_condition';
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    public function getListByArg(array $arg,$field='*',$groub=false)
    {
        $user = $this->where($arg);
        if($groub){
            $user->group($groub);
        }
        return $user->field($field)->select();
    }

    public function getListByArgOne(array $arg,$field='*')
    {
        return $this->where($arg)->field($field)->find();
    }
}
